﻿using System;

namespace Pfz.RemoteGaming.Internal
{
	internal struct _ClientUnregisterAction:
		IDisposable
	{
		private RemoteGameClient _owner;
		private Type _requestType;

		public _ClientUnregisterAction(RemoteGameClient owner, Type requestType)
		{
			_owner = owner;
			_requestType = requestType;
		}
		public void Dispose()
		{
			lock(_owner._registeredActions)
				_owner._registeredActions.Remove(_requestType);
		}
	}
}
